package com.example.myapplication.retrofit

import android.os.Bundle
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import com.example.myapplication.Kotlin2ViewModle
import com.example.myapplication.R
import com.orhanobut.logger.Logger
import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
import retrofit2.Retrofit

/**
 * 类描述:
 * 创建人:   tangchao$
 * 创建时间: 2021/7/25$ 9:01 PM$
 * 联系方式: 419704299@qq.com
 * 修改人:   tangchao$
 * 修改时间: 2021/7/25$ 9:01 PM$
 * 修改备注:  [说明本次修改内容]
 */
class TestRetrfitActivity : AppCompatActivity() {
//    lateinit var binding: TestRetrfitActivity
    private val viewModel: RetrofitViewModel by viewModels()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
//        binding = DataBindingUtil.setContentView(this, R.layout.testretrofit)
        initData()

    }

    private fun initData() {
//        viewModel.getData()
        viewModel.getarticle()

    }

}